import request from '@/utils/request'

// 商品添加
export function CreateGoods(data) {
  return request({
    url: '/mall/goods/add',
    method: 'post',
    data
  })
}

// 商品修改
export function EditGoods(data) {
  return request({
    url: '/mall/goods/edit',
    method: 'post',
    data
  })
}

// 商品上架下架
export function UpDownGoods(data) {
  return request({
    url: '/mall/goods/upDown',
    method: 'post',
    data
  })
}

// 商品删除
export function RemoveGoods(data) {
  return request({
    url: '/mall/goods/remove/' + data,
    method: 'delete',
    data:{}
  })
}

// 商品详情
export function GetGoodsDetails(data) {
  return request({
    url: '/mall/goods/' + data,
    method: 'get',
  })
}

// 分页列表查询
export function GetGoodsList(params) {
  return request({
    url: '/mall/goods/list',
    method: 'get',
    params
  })
}
